package com.daniel.bootdemoh.web.controllers;

import com.daniel.bootdemoh.Author;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * >
 *
 * @author DaiZM
 * @description >
 * @date 2017/10/28
 */
@RestController
public class IndexController {

	@GetMapping(value={"/index","/"})
	public String index() {
		System.err.println("Hello Index!");
		return "Hell IDEA!";
	}

	@Autowired
	private Author author;

	@GetMapping(value={"/author"})
	public Author getAuthor() {
		return author;
	}
}
